<template>
  <div>
    <h1>{{ count }}</h1>
    <button @click="add">累加</button>
  </div>
</template>

<script>
export default {
  name: "MyCount",
  data() {
    return {
      count: 0,
    };
  },
  methods: {
    add() {
      this.add++;
    },
  },
};
</script>

<style>
.count {
  background-color: yellowgreen;
  height: 200px;
}
</style>
